package org.carabiner.harness;

import java.awt.event.ActionEvent;

import javax.swing.Action;
import javax.swing.Icon;

import org.carabiner.infopanel.InspectorInfoPanel;

class InfoPanelAction extends AbstractInfoPanelAction
{
  private static final String NAME = "Inspector";
  private static final long serialVersionUID = 6506162054822043568L;

  public InfoPanelAction(Harness parent)
  {
    super(parent);
    putValue(Action.SMALL_ICON, getIcon("inspect.png"));
    putValue(Action.LONG_DESCRIPTION, "Inspector Panel: Shows component hierarchy and events");
  }
  
  public void actionPerformed(ActionEvent e)
  {
    InspectorInfoPanel panel = new InspectorInfoPanel(getHarness().getInspector());
    getHarness().addInfoPanel(NAME, panel, (Icon)getValue(Action.SMALL_ICON));
  }


  
}
